package cn.jluzh.blog.modules.tag.service.impl;

import cn.jluzh.blog.mapper.SysTagMapper;
import cn.jluzh.blog.modules.tag.entity.SysTag;
import cn.jluzh.blog.modules.tag.service.TagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl extends ServiceImpl<SysTagMapper, SysTag> implements TagService {

    @Autowired
    SysTagMapper sysTagMapper;

    @Override
    public List<SysTag> getAllTag() {
        return sysTagMapper.getAllTag();
    }

    @Override
    public SysTag getTagById(Integer id) {
        return sysTagMapper.getTagById(id);
    }

    @Override
    public List<SysTag> getTagByArtId(long articleId) {
        return sysTagMapper.getTagByArtId(articleId);
    }

    @Override
    public List<Integer> queryHotTagIds(Integer limit) {
        return sysTagMapper.queryHotTagIds(limit);
    }

    @Override
    public List<SysTag> getAllTagByName(String query) {
        return sysTagMapper.getAllTagByName(query);
    }


}
